<div ng-if="!$ctrl.isSelect" class="form-group" ng-init="$ctrl.initData()">
    <label class="control-label" ng-if="$ctrl.isShowTitle=='true'" ng-bind="$ctrl.title"></label>    
    <div ng-switch="$ctrl.type">
        <div ng-switch-when="0">
            <!--custom-->
            <input 
                class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="text" ng-model="$ctrl.stringValue" 
                placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="1">
            <!--datetime-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                ng-change="$ctrl.updateStringValue($ctrl.type)"
                type="datetime-local" ng-model="$ctrl.dateObj" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="2">
            <!--date-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                ng-change="$ctrl.updateStringValue($ctrl.type)"
                type="date" ng-model="$ctrl.dateObj" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="3">
            <!--time-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}"
                ng-change="$ctrl.updateStringValue($ctrl.type)" 
                type="time" ng-model="$ctrl.dateObj" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="4">
            <!--duration-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="text" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="5">
            <!--phonenumber-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="tel" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="6">
            <!--Currency-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                ng-change="$ctrl.updateStringValue($ctrl.type)" 
                type="number" ng-model="$ctrl.doubleValue" placeholder="{{$ctrl.title}}">
            <label class="control-label" ng-bind="$ctrl.doubleValue | currency:''"></label>
        </div>
        <div ng-switch-when="7">
            <!--Text-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" type="text" 
                ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="8">
            <!--Html-->
            <trumbowyg class="trumbowyg-dark" options="{}" 
                ng-model="$ctrl.stringValue"></trumbowyg>
        </div>
        <div ng-switch-when="9">
            <!--TextArea-->
            <textarea class="form-control form-control-sm {{$ctrl.inputClass}}" rows="5" 
                ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}"></textarea>
        </div>
        <div ng-switch-when="10">
            <!--Email-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="email" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="11">
            <!--Password-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="password" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="12">
            <!--Url-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="url" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="13">
            <!--ImageUrl-->
            <input placeholder="{{$ctrl.title}}" class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="url" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="14">
            <!--CreditCard-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="text" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="15">
            <!--PostalCode-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="text" ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
        </div>
        <div ng-switch-when="16">
            <!--upload-->
            <custom-image header="'Image'" type="'Posts'" folder="'Attributes'"
                    src-url="$ctrl.stringValue" src="$ctrl.stringValue" auto="'true'"></custom-image>
        </div>
        <div ng-switch-when="17">
            <!--Color-->
            <input class="form-control form-control-sm {{$ctrl.inputClass}}" type="color" 
                value="{{$ctrl.stringValue}}"
                ng-model="$ctrl.stringValue" placeholder="{{$ctrl.title}}">
            <input class="form-control form-control-sm" type="text" ng-model="$ctrl.stringValue"/>
        </div>
        <div ng-switch-when="18">
            <!--Boolean-->
            
            <input class="{{$ctrl.inputClass}}" type="checkbox" placeholder="{{$ctrl.title}}"
                ng-change="$ctrl.updateStringValue($ctrl.type)"
                ng-model="$ctrl.booleanValue" ng-checked="$ctrl.booleanValue" >
        </div>
        <div ng-switch-when="19">
            <mix-select-icons prefix="'fab'" options="$ctrl.icons" data="$ctrl.stringValue"></mix-select-icons>            
        </div>
        <div ng-switch-when="20">            
            <youtube-editor code="$ctrl.stringValue"></youtube-editor>
        </div>
        <div ng-switch-when="21">  
            <tui-editor content="$ctrl.stringValue"></tui-editor>
        </div>
        <div ng-switch-when="22">  <!-- Number -->
            <input 
                class="form-control form-control-sm {{$ctrl.inputClass}}" 
                type="number" ng-model="$ctrl.doubleValue" 
                placeholder="{{$ctrl.title}}">            
        </div>
        <div ng-switch-when="23">  <!-- Referrence -->
            <a ng-if="$ctrl.parentId" href="/portal/attribute-set-data/details?dataId=default&attributeSetId={{$ctrl.referenceId}}&parentType={{$ctrl.parentType}}&parentId={{$ctrl.parentId}}" 
                class="btn btn-sm btn-primary px-4 mt-3 ng-scope">
                <i class="fas fa-plus"></i> Add
            </a>
            <attribute-set-values on-update="$ctrl.updateRefData(data)" on-delete="$ctrl.removeRefData(data)" 
                header="$ctrl.title" 
                data="$ctrl.refData">
            </attribute-set-values>
        </div>
    </div>
</div>
<div ng-if="$ctrl.isSelect" class="form-group">
                                    
    <label class="control-label" ng-if="$ctrl.isShowTitle" ng-bind="$ctrl.title"></label>                                    
    <mix-select-icons ng-if="$ctrl.type==19" options="$ctrl.options" data="$ctrl.booleanValue"></mix-select-icons>
    
    <select ng-if="$ctrl.type!=19" class="btn custom-select form-control" ng-model="$ctrl.booleanValue">
        <option ng-repeat="item in $ctrl.options track by $index" ng-value="item.value">{{item.value}}</option>
    </select>
    <br/>                    
</div>